package com.emip.bean;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(name = "T_SiteItem")
public class SiteItemBean implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE,generator="S_SITEITEM_ID_GENE")
    @SequenceGenerator(name="S_SITEITEM_ID_GENE",sequenceName="S_SITEITEM_ID", allocationSize = 1)
	private int id;
	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
    @JoinColumn(name = "siteID")
    private SiteBean site;
	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
    @JoinColumn(name = "itemID")
	private ItemBean item;
	@Column(name="eMaxValue")
	private double eMaxValue;
	@Column(name="eMinValue")
	private double eMinValue;
	@Column(name="overMaxValue")
	private double overMaxValue;
	@Column(name="overMinValue")
	private double overMinValue;
	@Column(name="standUnit")
	private String standUnit;
	@Column(name="scale")
	private int scale;
	@Column(name="maxRange")
	private double maxRange;
	@Column(name="minRange")
	private double minRange; 
	@Column(name="factor")
	private float factor;
	@Column(name="dataid")
	private String dataid;
	@Column(name="datafid")
	private String datafid;
	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name="alarmID")
	private AlarmConfigBean alarm;
	@Column(name="remark")
	private String remark;
	public SiteItemBean() {
		
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public SiteBean getSite() {
		return site;
	}
	public void setSite(SiteBean site) {
		this.site = site;
	}
	public ItemBean getItem() {
		return item;
	}
	public void setItem(ItemBean item) {
		this.item = item;
	}
	public void setOverMaxValue(double overMaxValue) {
		this.overMaxValue = overMaxValue;
	}
	public double geteMaxValue() {
		return eMaxValue;
	}
	public void seteMaxValue(double eMaxValue) {
		this.eMaxValue = eMaxValue;
	}
	public double geteMinValue() {
		return eMinValue;
	}
	public void seteMinValue(double eMinValue) {
		this.eMinValue = eMinValue;
	}
	public double getOverMaxValue() {
		return overMaxValue;
	}
	public void setOverMaxValue(float overMaxValue) {
		this.overMaxValue = overMaxValue;
	}
	public double getOverMinValue() {
		return overMinValue;
	}
	public void setOverMinValue(double overMinValue) {
		this.overMinValue = overMinValue;
	}
	public String getStandUnit() {
		return standUnit;
	}
	public void setStandUnit(String standUnit) {
		this.standUnit = standUnit;
	}
	public int getScale() {
		return scale;
	}
	public void setScale(int scale) {
		this.scale = scale;
	}
	public double getMaxRange() {
		return maxRange;
	}
	public void setMaxRange(double maxRange) {
		this.maxRange = maxRange;
	}
	public double getMinRange() {
		return minRange;
	}
	public void setMinRange(double minRange) {
		this.minRange = minRange;
	}
	public float getFactor() {
		return factor;
	}
	public void setFactor(float factor) {
		this.factor = factor;
	}
	public String getDataid() {
		return dataid;
	}
	public void setDataid(String dataid) {
		this.dataid = dataid;
	}
	public String getDatafid() {
		return datafid;
	}
	public void setDatafid(String datafid) {
		this.datafid = datafid;
	}
	
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public void setAlarm(AlarmConfigBean alarm) {
		this.alarm = alarm;
	}
	public AlarmConfigBean getAlarm() {
		return alarm;
	}
	
}
